<!DOCTYPE html>
<html>
<head>
    <title>修改用户信息 - {{ user.username }}</title>
    <style>
        .form-container {
            max-width: 500px;
            margin: 20px auto;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        .form-group {
            margin-bottom: 15px;
        }
        label {
            display: inline-block;
            width: 120px;
            font-weight: bold;
        }
        input[type="text"],
        input[type="email"],
        input[type="tel"] {
            width: 250px;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
        button {
            background-color: #4CAF50;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        button:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
    <div class="form-container">
        <h2>修改用户信息</h2>
        <form action="{{ url_for('update_user', username=user.username) }}" method="post">
            <div class="form-group">
                <label>用户名:</label>
                <input type="text" name="new_username" value="{{ user_email.username }}" required>
            </div>

            <div class="form-group">
                <label>邮箱:</label>
                <input type="text" name="new_email" value="{{ user_email.email }}" required>
            </div>

            <div class="form-group">
                <label>地址:</label>
                <input type="text" name="new_address" value="{{ user_info.address }}" required>
            </div>

            <div class="form-group">
                <label>电话:</label>
                <input type="text" name="new_phone" value="{{ user_info.phone }}" required>
            </div>

            <button type="submit">保存修改</button>
            <a href="{{ url_for('index') }}" style="margin-left: 10px;">返回列表</a>
        </form>
    </div>
</body>
</html>